/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.hochschild.aplicacion.domain;

import javax.persistence.Entity;
import javax.persistence.Id;
import org.hibernate.annotations.NamedNativeQuery;

/**
 *
 * @author Edson
 */


@NamedNativeQuery(name = "getDataBaseVersion",
    callable = true,
    query = "SELECT CONVERT(VARCHAR(100),SERVERPROPERTY('servername'))+'\\'+ db_name() as version",
    readOnly = true,
    cacheable = false,
    resultClass = DataBaseVersion.class)
@Entity
public class DataBaseVersion {

    @Id
    private String version;

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }


}
